﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net;
using System.Net.Sockets;

namespace Test
{
    class Program
    {
        static void Main(string[] args)
        {
            UdpClient client = new UdpClient();
            IPEndPoint ip = new IPEndPoint (IPAddress.Any,0);
            IPEndPoint ipp = new IPEndPoint(IPAddress.Broadcast, 9999);
            byte[] bytes = new byte[] { };
            client.Send(bytes, 0, ipp);
            client.Receive(ref ip);
            Console.ReadLine();
        }

        private void DNSTest()
        {
            IPAddress[] address = Dns.GetHostAddresses("localhost");

            Console.WriteLine(address.Length);
          
        }
    }
}
